<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="Stylesheet" type="text/css" href="Content/base.css" />
<link rel="Stylesheet" type="text/css" href="Content/blogPage.css" />
<link rel="Stylesheet" type="text/css"
	href="Content/blogPage_articles.css" />
<style type="text/css">
a {
	text-decoration: none;
}

#mainCol .mainCol-body span {
	font-size: 15px;
	font-weight: bold;
}

.clear {
	clear: both;
}

#mainCol .mainCol-body dl {
	width: 200px;
	float: left;
	margin: 10px 10px;
}

#mainCol .mainCol-body dd {
	text-align: center;
}
</style>
</head>
<body>
	<div id="page">
		<div id="blog">
			<div id="blogHead">
				<s:action name="header" namespace="/" executeResult="true"></s:action>
			</div>
			<div id="blogBody">
				<div id="sideCol">
					<s:action name="sidebar" namespace="/" executeResult="true"></s:action>
				</div>
				<div id="mainCol">
					<div class="mainCol-head">
						<span class="title">相册</span>
					</div>
					<div class="mainCol-body">
						<c:if test="${empty photos }">
							<span>${user.nickname }的相册</span>
							<div class="clear"></div>
							<c:forEach items="${albumList }" var="a">
								<dl>
									<dt>
										<img
											src="${pageContext.request.contextPath }/UserFiles/Albums/${a.user.id }/${a.id }/Thumbnail/${a.cover}">
									</dt>
									<dd>
										<a href="userAlbum?albumId=${a.id }&userId=${userId}">${a.name }</a>
									</dd>
								</dl>
							</c:forEach>
						</c:if>
						<c:if test="${not empty photos }">
							<span>相册：${album.name }</span>
							<div class="clear"></div>
							<c:forEach items="${photos }" var="p">
								<dl>
									<dt>
										<img
											src="${pageContext.request.contextPath }/UserFiles/Albums/${p.user.id }/${p.album.id }/Thumbnail/${p.filePath}">
									</dt>
									<dd>
										<a href="photo?userId=${p.user.id }&photoId=${p.id}">${p.title }</a>
									</dd>
								</dl>
							</c:forEach>
						</c:if>
						<div class="clear"></div>
					</div>
					<div class="mainCol-foot"></div>
				</div>

			</div>
			<div id="blogFoot"></div>
		</div>
	</div>
</body>
</html>